<?php
// breadcrumbs
$this->breadcrumbs = array(
    'Users' => array('index'),
    'Create',
); ?>

<?php
//'use_query_string'=>true,
// Creating the URL that will handle our uploads
// check the parameter at the end
// $uurl = $this->createUrl('picture/upload',array('yourvarname'=>$yourvar));
$uurl = $this->createUrl('user/upload');
// here is our widget!

$this->widget('application.extensions.swfupload.CSwfUpload', array(
// here you include the post params you want the
// upload function to handle when a file is submitted
    //'postParams'=>array('avatar'=>$model->avatar),
    'config' => array(
        //'use_query_string'=>false,
        //Use $this->createUrl method or define yourself
        'model'=>$model,
        'upload_url' => CHtml::normalizeUrl($uurl),
        // This is a workaround to avoid certain
        // issues (check SWFUpload Forums)
        'file_size_limit' => '2 MB',
        // Allowed file types
        'file_types' => '*.jpg;*.png;*.gif',
        // File types description
        'file_types_description' => 'Images',
        // unlimited number of files
        'file_upload_limit' => 0,
        // refer to handlers.js from here below
        'file_queue_error_handler' => 'fileQueueError',
        'file_modal_complete_handler' => 'js:fileModalComplete',
        'upload_progress_handler' => 'js:uploadProgress',
        'upload_error_handler' => 'js:uploadError',
        'upload_success_handler' => 'js:uploadSuccess',
        'upload_complete_handler' => 'js:uploadComplete',
        // what is our upload target layer?
        'custom_settings' => array('upload_target' => 'divFileProgressContainer'),
        // where are we going to place the button?
        'button_placeholder_id' => 'swfupload',
        'button_width' => 200,
        'button_height' => 24,
        'button_text' => '<span class="button">Select Images <span class="buttonSmall">(2 MB Max)</span></span>',
        'button_text_style' => '.button { font-family:"Lucida Grande", "Lucida Sans Unicode", Helvetica, Arial, Verdana, sans-serif; font-size:12px; color:#666666; } .buttonSmall { font-size: 12px; }',
        'button_text_top_padding' => 2,
        'button_text_left_padding' => 18,
        'button_window_mode' => 'js:SWFUpload.WINDOW_MODE.TRANSPARENT',
        'button_cursor' => 'js:SWFUpload.CURSOR.HAND',
    ),
)); ?>

<div class="main-tit">
    <h2>Create A User</h2>
</div>

<?php echo $this->renderPartial('_form', array('model' => $model)); ?>

